<?php
/**
 * Gallery Settings
 * 
 * @package Bd Gallery
 * @author Bebliuc George Cristian
 * @author Gianfranco Liporace
 * @copyright 2008-2010
 * @version 1.3
 * @access public
 * @permisions Modify, Redistribute but leave the credits alive :P
 * @use Noncommercial, for commercial use, please contact me at bebliuc.george@gmail.com, it's for free, but I need to know
 * 
 */
 ?>

<h1><?php echo __('Gallery - Path Settings'); ?></h1>
<form action="<?php echo get_url('plugin/gallery/save_settings'); ?>" method="post">
    <fieldset style="padding: 0.5em;">
        <legend style="padding: 0em 0.5em 0em 0.5em; font-weight: bold;"><?php echo __('Gallery settings'); ?></legend>
        <table class="fieldset" cellpadding="0" cellspacing="0" border="0">
            <tr>
                <td class="label"><label for="images_folder"><?php echo __('Images Folder'); ?>: </label></td>
                <td class="field"><input name="images_folder" type="text" size="35" value="<?php echo $images_folder; ?>"/></td>
                <td class="help">Example: <code>album/</code>, where album is a folder in the "public" directory</td>
            </tr>
            <tr>
                <td class="label"><label for="gallery_page"><?php echo __('Gallery Path'); ?>: </label></td>
                <td class="field"><input name="gallery_page" type="text" size="35" value="<?php echo $gallery_page; ?>"/></td>
                <td class="help"><?php echo __('The path used to access the Gallery function.<br/>Example: <code>/gallery</code>'); ?></td>
            </tr>
            <tr>
                <td class="label"><label for="delete_file"><?php echo __('Delete files'); ?>: </label></td>
                <td class="field">
					<select name="delete_file">
						<option value="1" <?php if($delete_file == "1") echo 'selected ="";' ?>><?php echo __('Yes'); ?></option>
						<option value="2" <?php if($delete_file == "2") echo 'selected ="";' ?>><?php echo __('No'); ?></option>
					</select>	
				</td>
                <td class="help"><?php echo __('Choose yes if you want to also remove photo files with database entries.'); ?><br/></td>
            </tr>
        </table>
    </fieldset>
    <br/>
    <fieldset style="padding: 0.5em;">
        <legend style="padding: 0em 0.5em 0em 0.5em; font-weight: bold;"><?php echo __('Frontend Preferences'); ?></legend>
        <table class="fieldset" cellpadding="0" cellspacing="0" border="0">
            <tr>
                <td class="label"><label for="title"><?php echo __('Gallery Page Name'); ?></label></td>
                <td class="field"><input name="title" value="<?php echo $title; ?>" type="text" size="35"/></td>
                <td class="help"><?php echo __('Gallery page name on frontend'); ?></td>
            </tr>
			<tr>
                <td class="label"><label for="script"><?php echo __('Script'); ?>: </label></td>
                <td class="field">
					<select name="script">
						<option value="shadowbox" <?php if($script == "shadowbox") echo 'selected ="";' ?>>ShadowBox</option>
						<option value="slimbox" <?php if($script == "slimbox") echo 'selected ="";' ?>>SlimBox</option>
						<option value="popup" <?php if($script == "popup") echo 'selected ="";' ?>>Popup</option>
						<option value="none" <?php if($script == "none") echo 'selected ="";' ?>>None</option>
					</select>	
				</td>
                <td class="help"><?php echo __('Script for the front-end thumbnails. Applied on click.'); ?><br/></td>
            </tr>
            	<tr>
                <td class="label"><label for="framework"><?php echo __('Include Framework'); ?>: </label></td>
                <td class="field">
					<select name="framework">
						<option value="1" <?php if($framework == "1") echo 'selected ="";' ?>><?php echo __('Yes'); ?></option>
						<option value="2" <?php if($framework == "2") echo 'selected ="";' ?>><?php echo __('No'); ?></option>
					</select>	
				</td>
                <td class="help"><?php echo __('Choose yes if you want to automatically use the JS Framework. Example Mootools, jQuery, Prototype.'); ?><br/></td>
            </tr>
            <tr>
                <td class="label"><label for="thumbs_per_row"><?php echo __('Thumbnails per row'); ?></label></td>
                <td class="field">
                    <input name="thumbs_per_row" type="text" size="5" value="<?php echo $thumbs_per_row; ?>"/>
				</td>
                <td class="help"><?php echo __('Number of thumbnails per row displayed in gallery frontend.'); ?></td>
            </tr>
        </table>
    </fieldset>
    <br/>
	<fieldset style="padding: 0.5em;">
        <legend style="padding: 0em 0.5em 0em 0.5em; font-weight: bold;"><?php echo __('Thumbnails Preferences'); ?></legend>
        <table class="fieldset" cellpadding="0" cellspacing="0" border="0">
            <tr>
                <td class="label"><label for="thumbnail_width"><?php echo __('Width'); ?>:</label></td>
                <td class="field"><input name="thumbnail_width" type="text" size="4" maxlength="5" value="<?php echo $thumbnail_width; ?>"/> <?php echo __('pixels'); ?></td>
                <td class="help"><?php echo __('Width of the thumbnails'); ?></td>
            </tr>
            <tr>
                <td class="label"><label for="thumbnail_height"><?php echo __('Height'); ?>: </label></td>
                <td class="field"><input name="thumbnail_height" type="text" size="4" maxlength="5" value="<?php echo $thumbnail_height; ?>"/><?php echo __('pixels'); ?></td>
                <td class="help"><?php echo __('Height of the thumbnails'); ?></td>
            </tr>
            <tr>
                <td class="label"><label for="ratio"><?php echo __('Maintain aspect ratio'); ?>: </label></td>
                <td class="field"><select name="ratio">
				<option value="1" <?php if($ratio == 1) echo 'selected ="";' ?>><?php echo __('Yes'); ?></option>
				<option value="2" <?php if($ratio == 2) echo 'selected ="";' ?>><?php echo __('No'); ?></option>
				</select>	</td>
                <td class="help"><?php echo __('Mentain the aspect ratio of the image.'); ?></td>
            </tr>
             <tr>
                <td class="label"><label for="quality"><?php echo __('Quality'); ?>: </label></td>
                <td class="field"><select name="quality">
				<option value="2" <?php if($quality == 2) echo 'selected ="";' ?>><?php echo __('Worst'); ?></option>
				<option value="1" <?php if($quality == 1) echo 'selected ="";' ?>><?php echo __('Best'); ?></option>
				</select>	</td>
                <td class="help"><?php echo __('Set the quality of the thumbnails.'); ?></td>
            </tr>
        </table>
    </fieldset>
    
    <p class="buttons">
        <input class="button" name="commit" type="submit" accesskey="s" value="<?php echo __('Save'); ?>" />
    </p>
</form>
